<style lang="less" scoped>
  .page__wrapper {
    width: 100%;
    height: 100%;

    .page__title {
      text-align: center;
      font-weight: bolder;
    }
  }
</style>
<template>
  <div class="page__wrapper">
    <simple-tree-table :table-column="tableColumn" :table-data="tableData">
      <template slot="searchSection">
        <div class="page__title">未上市托管业务信息统计表</div>
        <simple-form v-model="searchModel" :form-field="searchFormField">
          <template slot="tableOperation">
            <el-button>{{$t('operation.search')}}</el-button>
            <el-button type="primary">{{$t('operation.exportExcel')}}</el-button>
            <el-button type="primary">{{$t('operation.exportPDF')}}</el-button>
          </template>
        </simple-form>
      </template>

      <template slot-scope="scope" slot="item">
        {{scope.row.item}}
      </template>
    </simple-tree-table>
  </div>
</template>
<script>
export default {
  name: 'inner_weishangshi_report',
  components: {},
  data () {
    return {
      searchModel: { a: '2018', b: '万元', c: '测试项目' },
      /** 表格数据 */
      tableData: [],
      companyLoadingFlag: false,
      companyList: []
    }
  },
  computed: {
    searchFormField () {
      return [
        { prop: 'a', label: this.$t('pushtable_inner.unlistedcustody.a'), type: 'Datepicker', component: { clearable: true, type: 'year', valueFormat: 'yyyy' } },
        { prop: 'b', label: this.$t('pushtable_inner.unlistedcustody.b'), type: 'Input', viewFlag: true },
        { prop: 'c', label: this.$t('pushtable_inner.unlistedcustody.c'), type: 'Input', viewFlag: true },
        { slotName: 'tableOperation', col: { xs: 12, sm: 16, md: 6, style: { textAlign: 'right' } }, labelWidth: '0' }
      ]
    },
    tableColumn () {
      return [
        { label: this.$t('pushtable_inner.unlistedcustody.item'), prop: 'item', width: 200, slotName: 'item' },
        {
          label: this.$t('pushtable_inner.unlistedcustody.ddd'),
          children: [
            { label: this.$t('pushtable_inner.unlistedcustody.g'), prop: 'ggg' },
            { label: this.$t('pushtable_inner.unlistedcustody.h'), prop: 'hhh' }
          ]
        },
        {
          label: this.$t('pushtable_inner.unlistedcustody.eee'),
          children: [
            { label: this.$t('pushtable_inner.unlistedcustody.g'), prop: 'iii' },
            { label: this.$t('pushtable_inner.unlistedcustody.h'), prop: 'jjj' }
          ]
        },
        {
          label: this.$t('pushtable_inner.unlistedcustody.fff'),
          children: [
            { label: this.$t('pushtable_inner.unlistedcustody.g'), prop: 'kkk' },
            { label: this.$t('pushtable_inner.unlistedcustody.h'), prop: 'lll' }
          ]
        }
      ]
    },
    quarter () {
      return this.$getDictList('quarter')
    }
  },
  methods: {
    handleDataSearch () {
      this.tableData = [
        {
          item: '资产总额',
          ggg: '341,207',
          hhh: '360,378',
          iii: '202,776',
          jjj: '242,971',
          kkk: '543,983',
          lll: '603,949',
          children: [
            { item: '货币资金', ggg: '68,241', hhh: '72,075', iii: '40,555', jjj: '48,594', kkk: '108,796', lll: '120,789' },
            { item: '存货和应收帐款净额', ggg: '68,241', hhh: '72,075', iii: '40,555', jjj: '48,594', kkk: '108,796', lll: '120,789' },
            { item: '固定资产净额', ggg: '68,241', hhh: '72,075', iii: '40,555', jjj: '48,594', kkk: '108,796', lll: '120,789' },
            { item: '（房屋建筑物）', ggg: '68,241', hhh: '72,075', iii: '40,555', jjj: '48,594', kkk: '108,796', lll: '120,789' },
            { item: '（矿区）', ggg: '68,243', hhh: '72,078', iii: '40,556', jjj: '48,595', kkk: '108,799', lll: '120,793' }
          ]
        },
        {
          item: '负债总额',
          ggg: '268,597',
          hhh: '300,328',
          iii: '121,169',
          jjj: '102,983',
          kkk: '389,766',
          lll: '403,311',
          children: [
            { item: '短期负息资金', ggg: '89,532', hhh: '100,109', iii: '40,389', jjj: '34,327', kkk: '129,921', lll: '134,436' },
            { item: '资产负债率', ggg: '89,532', hhh: '100,109', iii: '40,389', jjj: '34,327', kkk: '129,921', lll: '134,436' },
            { item: '损益情况', ggg: '89,533', hhh: '100,110', iii: '40,391', jjj: '34,329', kkk: '129,924', lll: '134,439' }
          ]
        }

      ]
    }
  },
  mounted () {
    this.handleDataSearch()
  }
}
</script>
